const { Op } = require('sequelize')
const vehicleModel = require("../../database/model-vehicle");
const read = async (ids) => {
  const condition = ids?.split?.(',') || []
  const rows = await vehicleModel.findAll({
    where:{
      id: {
        [Op.or]: condition,
      }
    }
  });
  return rows
};

module.exports = read